package com.gh.ggkt.vod.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author Eric Fang
 * @date 2022/9/5 21:22
 */
@Component
public class ConstantPropertiesUtil implements InitializingBean {

    @Value("${tencent.cos.file.region}")
    private String region;

    @Value("${tencent.cos.file.secretid}")
    private String secretid;

    @Value("${tencent.cos.file.secretkey}")
    private String secretkey;

    @Value("${tencent.cos.file.bucketname}")
    private String bucketname;

    public static String REGION;
    public static String SECRETID;
    public static String SECRETKEY;
    public static String BUCKETNAME;

    @Override
    public void afterPropertiesSet() throws Exception {
        REGION = region;
        SECRETID = secretid;
        SECRETKEY = secretkey;
        BUCKETNAME = bucketname;
    }
}
